Automation and New Tasks: How Technology Displaces and Reinstates Labor